package com.nyist.diseasepreventionserver.repository;

import com.nyist.diseasepreventionserver.entity.Role;
import com.nyist.diseasepreventionserver.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UserDAO extends JpaRepository<User,Integer> {
    //通过学号单个查询学生
    User findByUserSid(Integer userSid);
    //通过学号密码查询学生
    User findByUserSidAndUserPassword(Integer userSid,String userPassword);
    //通过用户id查找用户权限
    List<Role> findRoleById(Integer id);






}
